package com.sky.wonderrelationship.service;

import com.sky.wonderrelationship.entity.Field;
import com.sky.wonderrelationship.entity.FieldShipDetail;
import com.sky.wonderrelationship.entity.FieldShipDetailList;
import com.sky.wonderrelationship.entity.TreeRelationshipsNode;

import java.util.List;

public interface FieldShipService {
   //获取所有的数据库对应的表和字段
   List<Field> getAllFied();

   //根据db和field查询对应的表和字段
   List<Field> fuzzySearchField(String db,String table,Long field );


   List<FieldShipDetail> getRelationshipByfieldId(Long field );

   Integer addRelationShipByFieldId(Long field1,Long field2,String note);

   Integer deleteRelationShipByFieldId(Long id);

    List<FieldShipDetailList> seachSelectShip(String db, String table, Long field);

    List<TreeRelationshipsNode> queryTableAndTableShip(Field  field1, Field field2);

    //标记哪些节点有用，不剪掉它
    List<TreeRelationshipsNode> makeTagForest(List<TreeRelationshipsNode> list,Field  field);

    //把森林变String拼接起来
    List<String> forestToString(List<TreeRelationshipsNode> list);
}
